<%@ page import="pro.wyn.JdbcUtils" %>
<%@ page import="java.io.PrintWriter" %><%--
  Created by IntelliJ IDEA.
  User: 86188
  Date: 2021/12/12
  Time: 11:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String username = request.getParameter("u");
    String password = request.getParameter("p");
    String sql="SELECT id FROM `user` WHERE username = ? AND `password` = MD5(?)";
    Integer id = JdbcUtils.select(sql,Integer.class,username,password);
    String message = id!=null && id > 0?"登录成功！" : "登录失败!";

    PrintWriter writer = response.getWriter();
    writer.write(message);
    writer.flush();
    writer.close();
%>
